RFID INTERFACING WITH ARDUINO
In this tutorial, we are dealing with another interfacing technique. This time we are interfacing an RFID Reader which can read RFID Tags to Arduino (by using ATmega 328p miccrocontroller).
Synopsis

In this tutorial, we are dealing with another interfacing technique. This time we are interfacing an RFID Reader which can read RFID Tags to Arduino (by using ATmega 328p miccrocontroller). RFID is Radio Frequency Identification. An RFID reader is used to read RFID tags (which contain certain unique data stored in a chip).

Description

An RFID reader and an RFID tag, both have a coil surrounding them. When an RFID tag is shown near an RFID Reader, it collects the unique tag data (a combination of digits and characters) from the RFID tag. This is made possible via Electromagnetic Induction. Both RFID reader and RFID tag comes with a coil in them.

We power the RFID reader from power supply for reading purpose. Now when an RFID tag is shown near the reader, electromagnetic induction will take place between the coils and this powers the chip inside tag. This chip will send data electromagnetically to the reader. The reader will receive this electromagnetically transferred data and outputs it serially. Every RFID reader comes with Serial output pins. We can collect the read data through these serial pins using arduino or any other microcontroller.

RFID is the wireless use of electromagnetic fields to transfer data, for the purposes of automatically identifying and tracking tags attached to objects. The tags contain electronically stored information.

RFID is the wireless use of electromagnetic fields to transfer data, for the purposes of automatically identifying and tracking tags attached to objects. The tags contain electronically stored information.

On the basis their power source they are of two types :

1. ACTIVE RFID

It uses an internal power source (battery) within the tag to continuously power the tag and its RF communication circuitry.

2. PASSIVE RFID

It uses RF energy transferred from the reader to the tag to power the tag. It induces the energy via electromagnetic induction in tag, which in return supplies energy to tag’s electronics circuit. Its range is limited since efficiency of power transferred via electromagnetic induction is very poor with increasing distance between source and sink. This circuit works on principle of two-way radio transmitter-receivers called interrogators. In short, readers send a signal to the tag and read its response at 125Khz (in this case). It will read tag based on uEM 4001 or compatible chip within its range. It will output the cards ID in a serial string, which can easily be read by Arduino (any microcontroller).

These systems have many applications, like in offices, shopping malls and in many other places where only the person with authorization card is allowed to enter in the room. RFID is used in shopping malls to stop a theft from happening, here the product will be tagged with RFID chip and when a person leaves a building with the RFID chip an alarm is raised automatically and so the theft is stopped. The RFID authentication systems are easy to design and are cheap in cost. Some schools and colleges nowadays use RFID as attendance register.

Proteus design for RFID interfacing with Arduino


Orcad design for RFID interfacing with Arduino


RFID interfacing with Arduino

/*  Name     : main.c
 *  Purpose  : Source code for RFID Interfacing with Arduino.
 *  Author   : Gemicates
 *  Date     : 22-01-2018
 *  Website  : www.gemicates.org
 *  Revision : None
 */
#include <LiquidCrystal.h>
#include <SoftwareSerial.h>

// initialize the library with the numbers of the interface pins 

SoftwareSerial RFID(0, 1);
LiquidCrystal lcd(4, 5, 6, 7, 8, 9, 10, 11, 12, 13);            //RS, EN, D1, D2, D3, D4,D5,D6,D7
 
void setup() 
{
  RFID.begin(9600);                                             //RFID communication enabling by 9600 baud rate
  lcd.begin(16, 2);                                             // set up the LCD's number of columns and rows
}
 
void loop() 
{
  int index =0 ;                                                //integer for storing character of ID
  char unit;
  String msg;                                                   //memory for storing the characters of ID

 //while no card is in field of action
 
 if(msg==0)
 {
  lcd.setCursor(0,0);                                           //move courser to first line
  lcd.print(" TAG is not in  ");                                //prints that sentence
  lcd.setCursor(0,1);                                           //move courser to second line
  lcd.print("field of action ");                                //prints that sentence
 }

 while(RFID.available()>0)
 {
  //when card is in field
  lcd.setCursor(0,0);                                           //move courser to first line
  lcd.print("TAG ID number is");                                //prints that sentence
  lcd.setCursor(0,1);                                           //move courser to second line
  lcd.print("                ");                                //prints 12 characters on LCD

  //clearing previos data
 
  unit = RFID.read();                                           //storing 12 characters one by one
  index++;
  msg += unit;
 
  if(index == 12)  
  {
    lcd.setCursor(0,1);
    lcd.print(msg);
    break; 
  }
 }

 msg="";                                                        //clearing msg container
 delay(1000);                                                   //giving delay for persistence of vision
}

Error message here!

Show Error message here!


Forgot your password?

Error message here!

Send OTP

Error message here!

Show Error message here!


Lost your password? Please enter your email address. You will receive a password you Need.

Send Error message here!


Back to log-in

Close